﻿Public Class DichVuDuocDat_BLL
    Public Sub Them(ByVal dichVuDat As DichVuDat)
        Dim db As New QLTCDataContext
        Dim query = From dich_VuDat In db.DichVuDats
                    Select dich_VuDat.ID
        Dim lc = 0
        For i As Integer = 0 To query.ToList.Count - 1
            If query.ToList.Item(i) > lc Then
                lc = query.ToList.Item(i)
            End If
        Next
        dichVuDat.ID = lc + 1
        db.DichVuDats.InsertOnSubmit(dichVuDat)
        db.SubmitChanges()
    End Sub
End Class
